home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / database / hl / hl-1.000 / hl-1 / TkLibrarian / Install < prev    next >
Encoding:
Text File  |  1995-04-18  |  1.1 KB  |  48 lines

  1. #!/bin/csh
  2. set LIBFILES = (Warranty.message tklibr.copying.message TkLibrarian.help \
  3.         CardDisp.help ListItems.help)
  4. set BINSRCFILE = TkLibrarian.src
  5. set BINFILE = TkLibrarian
  6.  
  7. if ("`whoami`" != "root") then
  8.     echo "You need to run this script as root.  Either login as root"
  9.     echo "or use sudo"
  10.     exit 1
  11. endif
  12.  
  13. echo "*************** TkLibrarian Installation beginning *******************"
  14. echo ""
  15. echo "Default values are in '[]'.  Hitting ENTER or RETURN accepts the default"
  16. echo "value."
  17. echo ""
  18. echo -n "Binaries dir [/usr/local/bin]: "
  19. set ans = $<
  20. if ("$ans" == "") then
  21.     set BINDIR = /usr/local/bin
  22. else
  23.     set BINDIR = $ans
  24. endif
  25. echo -n "Library dir [/usr/local/lib/TkLibrarian]: "
  26. set ans = $<
  27. if ("$ans" == "") then
  28.     set LIBDIR = /usr/local/lib/TkLibrarian
  29. else
  30.     set LIBDIR = $ans
  31. endif
  32.  
  33. if (!(-d $BINDIR)) then
  34.     mkdir -p $BINDIR
  35. endif
  36. if (!(-d $LIBDIR)) then
  37.     mkdir -p $LIBDIR
  38. endif
  39.  
  40. /lib/cpp -P -DTKLIBRPATH=$LIBDIR -DBINDIR=$BINDIR $BINSRCFILE | sed 's/%%%/#/g' >$BINDIR/$BINFILE
  41. chmod +x $BINDIR/$BINFILE
  42.  
  43. cp $LIBFILES $LIBDIR/
  44.  
  45. ls -lgFCL $LIBDIR/ $BINDIR/$BINFILE
  46.  
  47. echo "*************** TkLibrarian Installation complete *******************"
  48.